Skip to content

Conversation

@avivkeller
Copy link

This PR adds the following additional TODO comments to the JavaScript TODO comment checker:

  • BUG
  • HACK
  • LATER
  • LATER2

@avivkeller avivkeller requested a review from a team as a code owner May 2, 2024 21:56
@github-actions github-actions bot added the JS label May 2, 2024
Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR has multiple problems. I don't think we can use this.

  • You removed the (?s) from the beginning of the regex, which means that you no longer match any comments containing a newline.
  • You have a case for later and a case for later2. The second of those is completely redundant, because everything matched by the second is matched by the first.

You suggestion to convert everything to lowercase combined with your quite broad regex means that you match a lot of comments that are obviously not TODO comments.
I took a look at what it finds in microsoft/vscode, and the below are some examples.

// it is being changed during build time at a later
...
// TS-HACK
...
// hack?
...
// The debug options for the server
...
// In case the debug session of interest was never caught anyhow.
...
// Useful for debugging, set to false to see exact match ranges
...
// If the result is a promise, we have to keep it for
// later processing and await the result properly.
....
// Chrome is buggy and doesn't handle 0 offsets well sometimes.

None of those are TODO comments.

I'm closing this PR.

@erik-krogh erik-krogh closed this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants